package com.daJiao.enums;

import com.daJiao.exception.IExceptionEnum;

/**
 * <p>Title:      CommonExceptionEnum. </p>
 * <p>Description 异常类型状态码 </p>
 * <p>Copyright: Copyright (c) 2016</p>
 * <p>Company:    医百科技有限公司 </p>
 *
 * @author         <a href="xinglinglove1029@163.com"/>杨文生</a>
 * @since      2020/12/30 14:16
 */
public enum CommonExceptionEnum implements IExceptionEnum {

    /**
     * 参数异常
     */
    GL100(100, "参数异常"),
    /**
     *无访问权限
     */
    GL401(401, "无效的token"),
    /**
     *未知异常
     */
    GL403(403, "无权限");

    int code;

    String msg;

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }

    CommonExceptionEnum(int code, String msg){
        this.code = code;
        this.msg = msg;
    }
}
